//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_killedsmtargetnormal.sqf"
#include "x_setup.sqf"

private ["_dvec", "_killer"];
PARAMS_2(_dvec,_killer);
if !(_dev isKindOf "CAManBase") then {
	__addDead(_dvec)
};
if (!isNull _killer && {_killer != _dvec}) then {
#ifdef __TT__
	GVAR(sm_winner) = switch (side (group _killer)) do {case opfor:{1}; case blufor:{2}; default{-1};};
#else
	GVAR(sm_winner) = if (side (group _killer) == GVAR(side_player)) then {2} else {-1};
#endif
} else {
	GVAR(sm_winner) = -1;
};
GVAR(sm_resolved) = true;
if (GVAR(IS_HC_CLIENT)) then {
	[QGVAR(sm_var), GVAR(sm_winner)] call FUNC(NetCallEventCTS);
};